package Code.AbstractClass.Test;


public class Test {
    static Frog frog = new Frog("青蛙",1);
    static Dog dog = new Dog("狗",2);
    static Sheep sheep= new Sheep("绵羊",3);
    public static void main(String[] args) {
        show(frog);
        frog.eat();
        frog.drink();

        show(dog);
        dog.eat();
        dog.drink();

        show(sheep);
        sheep.eat();
        sheep.drink();

    }

    public static void show(Animal a){
        System.out.println("名字："+a.getName()+"   年龄："+a.getAge());
    }
}
